//
//  GXShopBrowseView.m
//  YIChuSeller
//
//  Created by 田小椿 on 2018/12/2.
//  Copyright © 2018年 xiangshengjun. All rights reserved.
//

#import "GXShopBrowseView.h"
#import "GXShopDetailViewController.h"
@interface GXShopBrowseView ()
@property (weak, nonatomic) IBOutlet UIView *totalView;
@property (weak, nonatomic) IBOutlet UIImageView *photoImageView;
@property (weak, nonatomic) IBOutlet UILabel *detailLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UIImageView *backImageView;
@property (weak, nonatomic) IBOutlet UIButton *backButton;

@end
@implementation GXShopBrowseView
- (void)awakeFromNib
{
    [super awakeFromNib];
   
}
- (void)setContentDic:(NSDictionary *)contentDic
{
    _contentDic = contentDic;
    NSString *backImageStr = [NSString stringWithFormat:@"%@/%@",kBaseURLIMAGE,contentDic[@"backImage"]];
    [self.backImageView sd_setImageWithURL:[NSURL URLWithString:backImageStr] placeholderImage:[UIImage imageNamed:@"placeHolder_picture"]];
    NSString *logoStr = [NSString stringWithFormat:@"%@/%@",kBaseURLIMAGE,contentDic[@"logo"]];
    [self.photoImageView sd_setImageWithURL:[NSURL URLWithString:logoStr] placeholderImage:[UIImage imageNamed:@"placeHolder_shopLogo1"]];
    self.nameLabel.text = [NSString stringWithFormat:@"%@",contentDic[@"name"]];
    self.detailLabel.text = [NSString stringWithFormat:@"店铺简介:%@",contentDic[@"introduce"]];
    self.timeLabel.text = [NSString stringWithFormat:@"营业时间:%@",contentDic[@"businesstime"]];
}
+ (instancetype)shopBrowseView
{
    return [[NSBundle mainBundle]loadNibNamed:@"GXShopBrowseView" owner:nil options:nil].lastObject;
}
- (IBAction)pressBackBtn:(id)sender {
    [self.getViewController.navigationController popViewControllerAnimated:YES];
}
- (IBAction)pressShopDetailBtn:(UIButton *)sender {
    GXShopDetailViewController * detail = [[GXShopDetailViewController alloc]init];
    [self.getViewController.navigationController pushViewController:detail animated:YES];
}



@end
